<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title><bean:message key="app.title"/></title>
	</head>
	<body>
		<div id="wrapper">
			<jsp:include page="/pages/common.jsp"/>
			<table>
				<thead>
					<tr>
						<th>Titulo</th>
						<th>Descrição</th>
						<th>Data Upload</th>
						<th>Ações</th>
					</tr>
				</thead>
				<tbody>
					<logic:iterate id="document" name="documents">
						<tr>
							<td><bean:write name="document" property="title"/></td>	
							<td><bean:write name="document" property="description"/></td>
							<td><bean:write name="document" property="uploadDate"/></td>
							<td>
								<html:link action="/document/edit.do" paramId="id" paramName="document" paramProperty="id"><bean:message key="document.editLink"/></html:link>
								<html:link action="/document/delete.do" paramId="id" paramName="document" paramProperty="id"><bean:message key="document.deleteLink"/></html:link>
							</td>
						</tr>
					</logic:iterate>
				</tbody>				
			</table>
			<html:link action="/document/new.do"><bean:message key="document.newLink"/></html:link>
		</div>
	</body>
</html>